//
//  JXLandTextField.h
//
//
//  Created by YuSong.Yan on 15/10/13.
//
//

#import <UIKit/UIKit.h>

@class JXLandTextField;
@protocol JXLandTextFieldDelegate <NSObject>
-(void)textFieldDidBeginEditing:(JXLandTextField *)textField;
- (void)textFiledFinisedEdit:(JXLandTextField *)textField;
- (void)textFieldReturnBtnTouched:(JXLandTextField *)textField;
@end

typedef enum {
    JXTextFieldHeadTypeText,
    JXTextFieldHeadTypeIcon,
    JXTextFieldHeadTypeSecure
}JXTextFieldHeadType;


@interface JXLandTextField : UIView
@property (nonatomic, strong) UITextField *textField;
@property (nonatomic, strong) NSString *headTitle;
@property (nonatomic, strong) UIImage  *headIcon;
@property (nonatomic, strong) NSString *placeholder;
@property (nonatomic, strong) NSString *text;
@property (nonatomic, assign) id <JXLandTextFieldDelegate> delegate;

@property (nonatomic, assign) float textFontSize;
@property (nonatomic, assign) float headFontSize;
@property (nonatomic, assign) BOOL  isSecure;
@property (nonatomic, strong) UIColor *activeBorderColor;
@property (nonatomic, strong) UIColor *unActiveBorderColor;

- (id)initWithFrame:(CGRect)frame HeadType:(JXTextFieldHeadType)type;

- (void)setTextFiledHeadTitle:(NSString *)title Color:(UIColor *)color;
- (void)setTextFiledHeadIcon:(UIImage *)icon Color:(UIColor *)color;

- (void)becomeFirstInputResponder;
- (void)resignFirstInputResponder;

@end
